import 'package:flutter/material.dart';
import 'login.dart'; // 添加导入

class ProfileScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('我的'),
        backgroundColor: Colors.purple, // 设置AppBar背景颜色为紫色
        centerTitle: true, // 让标题居中
        leading: IconButton( // 添加退出按钮
          icon: Icon(Icons.exit_to_app),
          onPressed: () {
            Navigator.pushReplacement(
              context,
              MaterialPageRoute(builder: (context) => LoginPage()),
            );
          },
        ),
      ),
      body: Center(
        child: Text('我的'),
      ),
    );
  }
}